/**
 * 
 */
package org.gov.vis.data.gui;

import java.awt.Frame;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;

import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

import org.gov.vis.components.VISTextField;
import org.gov.vis.data.gui.listener.ProcurementSemenListener;
import org.gov.vis.gui.VisBaseDialog;
import org.gov.vis.gui.util.GuiUtil;
import org.gov.vis.util.DBConstants;

import com.toedter.calendar.JDateChooser;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
/**
 * @author Vishwanath
 *
 */
public class ProcurementSemenDialog extends VisBaseDialog {

	/**
	 * 
	 */
	private static final long serialVersionUID = -3949749299269917935L;
	private JPanel pnlPSMainPanel;
	private JLabel lblBreed;
	private JLabel lblBullNo;
	private JLabel lblNoOfStraws;
	private VISTextField txtFldCode;
	private JLabel lblCode;
	private JPanel pnlMessages;
	private JButton btnReset;
	private JButton btnSave;
	private JPanel btnPanel;
	private VISTextField txtFldDiscord;
	private JLabel lblDiscord;
	private VISTextField txtFldNoOfStraws;
	private VISTextField txtFldBullNo;
	private VISTextField txtFldBreed;
	private VISTextField txtFldFromStation;
	private JLabel lblFromStation;
	private VISTextField txtFldDOReceipt;
	private JLabel lblDateOfReceipt;
	private JDateChooser dtChoDateOfReceipt;

	/**
	 * @param owner
	 * @param title
	 * @param modal
	 */
	public ProcurementSemenDialog(Frame owner, String title, boolean modal) {
		super(owner, title, modal);
		// TODO Auto-generated constructor stub
		initGUI();
		GuiUtil.CompCenterCords cords=GuiUtil.getCompCenterCords(500, 450);
		setBounds(cords.getX(), cords.getY(), 500, 450);		
	}

	private void initGUI() {
		// TODO Auto-generated method stub
		GridBagLayout thisLayout = new GridBagLayout();
		thisLayout.rowWeights = new double[] {0.1};
		thisLayout.rowHeights = new int[] {7};
		thisLayout.columnWeights = new double[] {0.1};
		thisLayout.columnWidths = new int[] {7};
		getContentPane().setLayout(thisLayout);
		{
			pnlPSMainPanel = new JPanel();
			GridBagLayout pnlPSMainPanelLayout = new GridBagLayout();
			pnlPSMainPanelLayout.columnWidths = new int[] {7, 7, 7, 7, 7};
			pnlPSMainPanelLayout.rowHeights = new int[] {7, 7, 20, 7, 7, 7, 20, 7, 20, 7, 20, 7, 7, 7, 20, 7, 7, 7};
			pnlPSMainPanelLayout.columnWeights = new double[] {0.0, 0.0, 0.0, 0.1, 0.0};
			pnlPSMainPanelLayout.rowWeights = new double[] {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
			getContentPane().add(pnlPSMainPanel, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
			pnlPSMainPanel.setLayout(pnlPSMainPanelLayout);
			{
				lblDateOfReceipt = new JLabel();
				pnlPSMainPanel.add(lblDateOfReceipt, new GridBagConstraints(1, 4, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblDateOfReceipt.setText(setFieldLabel(getResources().getString("dialog_label_prmt_semen_dtofrcpt"), true));
			}
			/*{
				txtFldDOReceipt = new VISTextField();
				pnlPSMainPanel.add(txtFldDOReceipt, new GridBagConstraints(3, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
			}*/
			{
				lblFromStation = new JLabel();
				pnlPSMainPanel.add(lblFromStation, new GridBagConstraints(1, 6, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblFromStation.setText(setFieldLabel(getResources().getString("dialog_label_prmt_semen_frmstation"), true));
			}
			{
				txtFldFromStation = new VISTextField();
				pnlPSMainPanel.add(txtFldFromStation, new GridBagConstraints(3, 6, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
			}
			{
				dtChoDateOfReceipt = new JDateChooser(null,DBConstants.DISPLAY_DATE_FORMAT);
				dtChoDateOfReceipt.setPreferredSize(txtFldFromStation.getPreferredSize());
				pnlPSMainPanel.add(dtChoDateOfReceipt, new GridBagConstraints(3, 4, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
		
			}

			{
				lblBreed = new JLabel();
				pnlPSMainPanel.add(lblBreed, new GridBagConstraints(1, 8, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblBreed.setText(setFieldLabel(getResources().getString("dialog_label_prmt_semen_breed"), false));
			}
			{
				txtFldBreed = new VISTextField();
				pnlPSMainPanel.add(txtFldBreed, new GridBagConstraints(3, 8, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
			}
			{
				lblBullNo = new JLabel();
				pnlPSMainPanel.add(lblBullNo, new GridBagConstraints(1, 10, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblBullNo.setText(setFieldLabel(getResources().getString("dialog_label_prmt_semen_bullno"), true));
			}
			{
				txtFldBullNo = new VISTextField();
				pnlPSMainPanel.add(txtFldBullNo, new GridBagConstraints(3, 10, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
			}
			{
				lblNoOfStraws = new JLabel();
				pnlPSMainPanel.add(lblNoOfStraws, new GridBagConstraints(1, 12, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblNoOfStraws.setText(setFieldLabel(getResources().getString("dialog_label_prmt_semen_noofStrwas"), false));
			}
			{
				txtFldNoOfStraws = new VISTextField();
				pnlPSMainPanel.add(txtFldNoOfStraws, new GridBagConstraints(3, 12, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
			}
			{
				lblDiscord = new JLabel();
				pnlPSMainPanel.add(lblDiscord, new GridBagConstraints(1, 14, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				lblDiscord.setText(setFieldLabel(getResources().getString("dialog_label_prmt_semen_discord"), false));
			}
			{
				txtFldDiscord = new VISTextField();
				pnlPSMainPanel.add(txtFldDiscord, new GridBagConstraints(3, 14, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
			}
			{
				btnPanel = new JPanel();
				pnlPSMainPanel.add(btnPanel, new GridBagConstraints(3, 16, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
				{
					pnlMessages = new JPanel();
					GridBagLayout jPanel1Layout = new GridBagLayout();
					pnlPSMainPanel.add(pnlMessages, new GridBagConstraints(1, 1, 3, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
					jPanel1Layout.rowWeights = new double[] {0.1};
					jPanel1Layout.rowHeights = new int[] {7};
					jPanel1Layout.columnWeights = new double[] {0.1};
					jPanel1Layout.columnWidths = new int[] {7};
					pnlMessages.setLayout(jPanel1Layout);

				}
				{
					lblCode = new JLabel();
					pnlPSMainPanel.add(lblCode, new GridBagConstraints(1, 2, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0));
					lblCode.setText(setFieldLabel(getResources().getString("dialog_label_prmt_semen_code"), true));
				}
				{
					txtFldCode = new VISTextField();
					pnlPSMainPanel.add(txtFldCode, new GridBagConstraints(3, 2, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.VERTICAL, new Insets(0, 0, 0, 0), 0, 0));
				}
				{
					btnSave = new JButton();
					btnPanel.add(btnSave);
					btnSave.setText(getResources().getString("dialog_button_save"));
					btnSave.addActionListener(new ProcurementSemenListener(this));
				}
				{
					btnReset = new JButton();
					btnPanel.add(btnReset);
					btnReset.setText(getResources().getString("dialog_button_reset"));
					btnReset.addActionListener(new ProcurementSemenListener(this));
				}
			}
		}
		this.setSize(500, 450);
	}

	public JPanel getjPanel1() {
		return pnlMessages;
	}
	
	/**
	 * @return the pnlPSMainPanel
	 */
	public JPanel getPnlPSMainPanel() {
		return pnlPSMainPanel;
	}

	/**
	 * @param pnlPSMainPanel the pnlPSMainPanel to set
	 */
	public void setPnlPSMainPanel(JPanel pnlPSMainPanel) {
		this.pnlPSMainPanel = pnlPSMainPanel;
	}

	/**
	 * @return the lblBreed
	 */
	public JLabel getLblBreed() {
		return lblBreed;
	}

	/**
	 * @param lblBreed the lblBreed to set
	 */
	public void setLblBreed(JLabel lblBreed) {
		this.lblBreed = lblBreed;
	}

	/**
	 * @return the lblBullNo
	 */
	public JLabel getLblBullNo() {
		return lblBullNo;
	}

	/**
	 * @param lblBullNo the lblBullNo to set
	 */
	public void setLblBullNo(JLabel lblBullNo) {
		this.lblBullNo = lblBullNo;
	}

	/**
	 * @return the lblNoOfStraws
	 */
	public JLabel getLblNoOfStraws() {
		return lblNoOfStraws;
	}

	/**
	 * @param lblNoOfStraws the lblNoOfStraws to set
	 */
	public void setLblNoOfStraws(JLabel lblNoOfStraws) {
		this.lblNoOfStraws = lblNoOfStraws;
	}

	/**
	 * @return the btnReset
	 */
	public JButton getBtnReset() {
		return btnReset;
	}

	/**
	 * @param btnReset the btnReset to set
	 */
	public void setBtnReset(JButton btnReset) {
		this.btnReset = btnReset;
	}

	/**
	 * @return the btnSave
	 */
	public JButton getBtnSave() {
		return btnSave;
	}

	/**
	 * @param btnSave the btnSave to set
	 */
	public void setBtnSave(JButton btnSave) {
		this.btnSave = btnSave;
	}

	/**
	 * @return the btnPanel
	 */
	public JPanel getBtnPanel() {
		return btnPanel;
	}

	/**
	 * @param btnPanel the btnPanel to set
	 */
	public void setBtnPanel(JPanel btnPanel) {
		this.btnPanel = btnPanel;
	}

	/**
	 * @return the txtFldDiscord
	 */
	public VISTextField getTxtFldDiscord() {
		return txtFldDiscord;
	}

	/**
	 * @param txtFldDiscord the txtFldDiscord to set
	 */
	public void setTxtFldDiscord(VISTextField txtFldDiscord) {
		this.txtFldDiscord = txtFldDiscord;
	}

	/**
	 * @return the lblDiscord
	 */
	public JLabel getLblDiscord() {
		return lblDiscord;
	}

	/**
	 * @param lblDiscord the lblDiscord to set
	 */
	public void setLblDiscord(JLabel lblDiscord) {
		this.lblDiscord = lblDiscord;
	}

	/**
	 * @return the txtFldNoOfStraws
	 */
	public VISTextField getTxtFldNoOfStraws() {
		return txtFldNoOfStraws;
	}

	/**
	 * @param txtFldNoOfStraws the txtFldNoOfStraws to set
	 */
	public void setTxtFldNoOfStraws(VISTextField txtFldNoOfStraws) {
		this.txtFldNoOfStraws = txtFldNoOfStraws;
	}

	/**
	 * @return the txtFldBullNo
	 */
	public VISTextField getTxtFldBullNo() {
		return txtFldBullNo;
	}

	/**
	 * @param txtFldBullNo the txtFldBullNo to set
	 */
	public void setTxtFldBullNo(VISTextField txtFldBullNo) {
		this.txtFldBullNo = txtFldBullNo;
	}

	/**
	 * @return the txtFldBreed
	 */
	public VISTextField getTxtFldBreed() {
		return txtFldBreed;
	}

	/**
	 * @param txtFldBreed the txtFldBreed to set
	 */
	public void setTxtFldBreed(VISTextField txtFldBreed) {
		this.txtFldBreed = txtFldBreed;
	}

	/**
	 * @return the txtFldFromStation
	 */
	public VISTextField getTxtFldFromStation() {
		return txtFldFromStation;
	}

	/**
	 * @param txtFldFromStation the txtFldFromStation to set
	 */
	public void setTxtFldFromStation(VISTextField txtFldFromStation) {
		this.txtFldFromStation = txtFldFromStation;
	}

	/**
	 * @return the lblFromStation
	 */
	public JLabel getLblFromStation() {
		return lblFromStation;
	}

	/**
	 * @param lblFromStation the lblFromStation to set
	 */
	public void setLblFromStation(JLabel lblFromStation) {
		this.lblFromStation = lblFromStation;
	}

	/**
	 * @return the txtFldDOReceipt
	 */
	public VISTextField getTxtFldDOReceipt() {
		return txtFldDOReceipt;
	}

	/**
	 * @param txtFldDOReceipt the txtFldDOReceipt to set
	 */
	public void setTxtFldDOReceipt(VISTextField txtFldDOReceipt) {
		this.txtFldDOReceipt = txtFldDOReceipt;
	}

	/**
	 * @return the lblDateOfReceipt
	 */
	public JLabel getLblDateOfReceipt() {
		return lblDateOfReceipt;
	}

	/**
	 * @param lblDateOfReceipt the lblDateOfReceipt to set
	 */
	public void setLblDateOfReceipt(JLabel lblDateOfReceipt) {
		this.lblDateOfReceipt = lblDateOfReceipt;
	}

	/**
	 * @return the txtFldCode
	 */
	public VISTextField getTxtFldCode() {
		return txtFldCode;
	}

	/**
	 * @param txtFldCode the txtFldCode to set
	 */
	public void setTxtFldCode(VISTextField txtFldCode) {
		this.txtFldCode = txtFldCode;
	}

	/**
	 * @return the lblCode
	 */
	public JLabel getLblCode() {
		return lblCode;
	}

	/**
	 * @param lblCode the lblCode to set
	 */
	public void setLblCode(JLabel lblCode) {
		this.lblCode = lblCode;
	}

	/**
	 * @return the dtChoDateOfReceipt
	 */
	public JDateChooser getDtChoDateOfReceipt() {
		return dtChoDateOfReceipt;
	}

	/**
	 * @param dtChoDateOfReceipt the dtChoDateOfReceipt to set
	 */
	public void setDtChoDateOfReceipt(JDateChooser dtChoDateOfReceipt) {
		this.dtChoDateOfReceipt = dtChoDateOfReceipt;
	}

}
